<!-- diy模板市场 -->
<template>
  <div id="diy_template_market">
      <div class="diy_head">
          <div class="template_head">
              <div class="template_name">模板管理</div>
              <div class="button_box">
                  <a-button type="primary">点击同步</a-button>
                  <a-button type="danger">删除全部</a-button>
                  <p class="btn_warn_text">删除全部会清空本地数据(如果图片不显示,请尝试点击删除后重新同步)</p>
              </div>
          </div>
          <div class="select_type">
              <div class="select_type_child">
                  <div class="select_type_child_name">行业:</div>
                  <div class="select_type_child_box">
                      <div :style="{  }">
                        <a-radio-group default-value="a">
                            <a-radio-button value="a">全部</a-radio-button>
                            <a-radio-button value="b">美妆</a-radio-button>
                            <a-radio-button value="c">母婴用品</a-radio-button>
                            <a-radio-button value="d">珠宝</a-radio-button>
                            <a-radio-button value="e">水果生鲜</a-radio-button>
                            <a-radio-button value="f">日用百货</a-radio-button>
                            <a-radio-button value="h">服装箱包</a-radio-button>
                            <a-radio-button value="i">家居</a-radio-button>
                            <a-radio-button value="l">节日</a-radio-button>
                            <a-radio-button value="m">综合商城</a-radio-button>
                        </a-radio-group>
                        </div>
                  </div>
              </div>

              <div class="select_type_child">
                  <div class="select_type_child_name">页面：</div>
                  <div class="select_type_child_box">
                      <div :style="{  }">
                        <a-radio-group default-value="a">
                            <a-radio-button value="a">全部</a-radio-button>
                            <a-radio-button value="b">页面</a-radio-button>
                        </a-radio-group>
                        </div>
                  </div>
              </div>

              <div class="select_type_child">
                  <div class="select_type_child_name">类型：</div>
                  <div class="select_type_child_box">
                      <div :style="{  }">
                        <a-radio-group default-value="a">
                            <a-radio-button value="a">全部</a-radio-button>
                            <a-radio-button value="b">H5</a-radio-button>
                            <a-radio-button value="c">小程序</a-radio-button>
                        </a-radio-group>
                        </div>
                  </div>
              </div>
          </div>
      </div>
      <div class="diy_template_market_main">
          <div class="template_list">
              <div class="template_list_child" v-for="item in 10">
                  <img src="https://dev4.yunzmall.com/attachment/image/86e48d7829b62e860fa00243ecaf2c9a.jpg" alt="">
                  <div class="hoverBox">
                      <div class="selectBtn">选取</div>
                      <p class="template_title">商城首页模板1商城首页模板1</p>
                  </div>
              </div>
          </div>
      </div>
      <div class="bottom_pagination">
          <!-- 主活动列表的分页 -->
          <a-pagination
              class="page-pagination"
              showQuickJumper
              :pageSize="main_page_pagination.pageSize"
              :current="main_page_pagination.current"
              :total="main_page_pagination.total"
              @change="handle_page_change"/>
      </div>

  </div>
</template>

<script>
export default {
  data () {
    return {
        // 分页的页码
        main_page_pagination: {
            current: 1,
            pageSize: 10,
            total: 100
        },
    };
  },

  components: {},

  computed: {},

  methods: {
      /**
     * 分页切换
     */
    handle_page_change(page) {
        this.main_page_pagination.current = page;
    },
  }
}

</script>
<style lang="less" scoped>
#diy_template_market{
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px 20px 20px 20px;
    p{
        margin: 0;
    }
    .diy_head{
        width: 100%;
        overflow: hidden;
        flex-shrink: 0;
        .template_head{
            height: 38px;
            padding:0 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            .template_name{
                border-left: 4px solid #29ba9c;
                text-indent: 10px;
            }
            .button_box{
                display: flex;
                align-items: center;
                button{
                    margin-right: 12px;
                }
                .btn_warn_text{
                    max-width: 250px;
                    color: #ff0000;
                    line-height: 16px;
                }
            }
        }
        .select_type{
            display: flex;
            flex-direction: column;
            padding-top: 16px;
            .select_type_child{
                display: flex;
                padding: 0 24px 24px;
                .select_type_child_name{
                    width: 65px;
                    padding-right: 10px;
                    color: #000;
                    font-size: 14px;
                    height: 32px;
                    line-height: 32px;
                }
                .select_type_child_box{
                    flex: 1;
                    .ant-radio-button-wrapper{
                        border: none;
                        color: #999999;
                    }
                    .ant-radio-button-wrapper-checked{
                         box-shadow:none;
                    }
                    .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{
                        outline:none;
                        box-shadow:none;
                    }
                    .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){
                        color: #29ba9c;
                    }
                    .ant-radio-button-wrapper::before{
                        width: 0;
                    }
                }
            }
        }
    }
    .diy_template_market_main{
        flex: 1;
        padding:20px 40px;
        .template_list{
            display: flex;
            flex-wrap: wrap;
            .template_list_child{
                width: 145px;
                height: 254px;
                margin:0 20px 25px 0;
                overflow: hidden;
                border-radius: 15px;
                position: relative;
                img{
                    width: 100%;
                    height: 100%;
                }
                .hoverBox{
                    display: none;
                }
            }
            .template_list_child:hover{
                .hoverBox{
                    display: block;
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    top: 0;
                    left: 0;
                    background: rgba(0, 0, 0, 0.5);
                    .selectBtn{
                        position: absolute;
                        width: 70px;
                        height: 24px;
                        line-height: 24px;
                        background: #ffffff;
                        color: #29ba9c;
                        font-size: 10px;
                        text-align: center;
                        top: 50%;
                        left: 50%;
                        margin-top: -12px;
                        margin-left: -35px;
                        cursor: pointer;
                    }
                    .template_title{
                        position: absolute;
                        height: 30px;
                        line-height: 30px;
                        bottom: 0;
                        left: 0;
                        width: 100%;
                        text-align: left;
                        padding:0 8px;
                        color: #fff;
                        overflow: hidden;/*超出部分隐藏*/
                        text-overflow:ellipsis;/* 超出部分显示省略号 */
                        white-space: nowrap;/*规定段落中的文本不进行换行 */

                    }
                }
            }
        }
    }
    .bottom_pagination{
        flex-shrink: 0;
        height: 32px;
        margin-bottom: 24px;
        text-align: center;
    }
}
</style>
